package com.dev.bbs.mapper;

import org.apache.ibatis.annotations.Param;

import com.dev.bbs.domain.BbsUser;
import com.dev.common.core.dao.BaseMapper;

/**
 * 社区用户Mapper接口
 *
 * @author ruoyi
 * @date 2019-09-17
 */
public interface BbsUserMapper extends BaseMapper<BbsUser>
{
    /**
     * 校验注册用户是否唯一
     * 
     * @param username
     * @return
     */
    public int checkUsernameExist(@Param(value = "username") String username);

    /**
     * 查询用户及用户信息
     * @param userId
     * @return
     * @author zmr
     */
    public BbsUser getUserWithInfoById(Long userId);

    /**
     * 校验昵称是否唯一
     * @param nickname
     * @return
     * @author zmr
     */
    public int checkNicknameExist(String nickname);

    /**
     * @param bbsUser
     * @return
     * @author zmr
     */
    public int resetUserPwd(BbsUser bbsUser);
}
